import { createPage, PAGE_ROOT_SYMBOL } from '../../common/weapp-page'
import { concatClassList, px2rpx } from '@cloudbase/weda-client'
import { app, $app } from '../../app/weapps-api'
import { $2 as handlers } from '../../app/handlers'
const lifecycle = {}
const state = {}
const computed = {}
import { $page, $w } from './api'
import { widgetProps } from './data'





/** widget event listeners **/
const evtListeners = {"onicon2$tap": [
      {
          key: 'wdModal1585',
          sourceKey: 'platform:invoke',
          handler: function({data, $w}){
                const func = $w[data?.component]?.[data.method];
                if (typeof func !== 'function') {
                  throw new Error(`调用方法失败：未找到id为${data.component}下的方法${data.method}`);
                }
                return func(data.params);
              },
          args: {
  "params": [
    {
      "method": "close",
      "params": {
        "info": "icon"
      },
      "component": "modal1",
      "module": "gsd-h5-react"
    }
  ]
},
          argsBinds: {}
        }
    ],"onbutton2$tap": [
      {
          key: 'wdModal8493',
          sourceKey: 'platform:invoke',
          handler: function({data, $w}){
                const func = $w[data?.component]?.[data.method];
                if (typeof func !== 'function') {
                  throw new Error(`调用方法失败：未找到id为${data.component}下的方法${data.method}`);
                }
                return func(data.params);
              },
          args: {
  "params": [
    {
      "method": "close",
      "params": {
        "info": "cancel"
      },
      "component": "modal1",
      "module": "gsd-h5-react"
    }
  ]
},
          argsBinds: {}
        }
    ],"onbutton3$tap": [
      {
          key: 'wdModal2629',
          sourceKey: 'platform:invoke',
          handler: function({data, $w}){
                const func = $w[data?.component]?.[data.method];
                if (typeof func !== 'function') {
                  throw new Error(`调用方法失败：未找到id为${data.component}下的方法${data.method}`);
                }
                return func(data.params);
              },
          args: {
  "params": [
    {
      "method": "close",
      "params": {
        "info": "confirm"
      },
      "component": "modal1",
      "module": "gsd-h5-react"
    }
  ]
},
          argsBinds: {}
        }
    ],"ontext1$tap": [
      {
          key: 'wrbgooyhuak',
          sourceKey: 'platform:invoke',
          handler: function({data, $w}){
                const func = $w[data?.component]?.[data.method];
                if (typeof func !== 'function') {
                  throw new Error(`调用方法失败：未找到id为${data.component}下的方法${data.method}`);
                }
                return func(data.params);
              },
          args: {
  "params": [
    {
      "method": "open",
      "params": {},
      "component": "modal1",
      "module": "gsd-h5-react"
    }
  ]
},
          argsBinds: {}
        }
    ],"ontext8$tap": [
      {
          key: 'wvhjbbefrce',
          sourceKey: 'platform:callPhone',
          handler: function({args}){ return $app.callPhone(...args)},
          args: {
  "params": [
    {
      "tel": "4008736918"
    }
  ]
},
          argsBinds: {}
        }
    ],"onbutton1$tap": [
      {
          key: 'w1mdsbtff78',
          sourceKey: 'platform:cloud.callDataSource',
          handler: function({args}){ return $app.cloud.callDataSource(...args)},
          args: {
  "params": [
    {
      "params": {
        "ddh": "",
        "spmc": "2024年度报告申报服务",
        "zfzt": 1
      },
      "options": {
        "showToast": false,
        "showLoading": true
      },
      "outputs": {},
      "methodName": "wedaCreate",
      "dataSourceName": "wxzfmbddsj_CvVA"
    }
  ]
},
          argsBinds: {'params.0.params.spjg': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      90
    )}}
        }
    ],"onbutton1$w1mdsbtff78_success": [
      {
          key: 'w2e7lhlm30g',
          sourceKey: 'platform:cloud.callDataSource',
          handler: function({args}){ return $app.cloud.callDataSource(...args)},
          args: {
  "params": [
    {
      "params": {},
      "options": {
        "showToast": false,
        "showLoading": true
      },
      "outputs": "",
      "methodName": "wedaGetItem",
      "dataSourceName": "wxzfmbddsj_CvVA"
    }
  ]
},
          argsBinds: {'params.0.params._id': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      event.detail._id
    )}}
        }
    ],"onbutton1$w2e7lhlm30g_success": [
      {
          key: 'wb5nis8fxms',
          sourceKey: 'u_nian_du_bao_gao_she:ymnbt_pay',
          handler: handlers.ymnbt_pay,
          args: {
  "params": [
    {}
  ]
},
          argsBinds: {}
        }
    ],"onbutton1$wb5nis8fxms_success": [
      {
          key: 'wg13twtq6gb',
          sourceKey: 'platform:showToast',
          handler: function({args}){ return $app.showToast(...args)},
          args: {
  "params": [
    {
      "icon": "success",
      "title": "支付成功",
      "duration": 1500
    }
  ]
},
          argsBinds: {}
        },{
          key: 'wju50rkfwzy',
          sourceKey: 'platform:cloud.callDataSource',
          handler: function({args}){ return $app.cloud.callDataSource(...args)},
          args: {
  "params": [
    {
      "params": {
        "data": {
          "zfzt": 2
        },
        "select": {
          "$master": true
        }
      },
      "options": {
        "showToast": false,
        "showLoading": false
      },
      "outputs": {},
      "methodName": "wedaUpdateV2",
      "dataSourceName": "wxzfmbddsj_CvVA"
    }
  ]
},
          argsBinds: {'params.0.params.filter': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      ({
  "where": {
    "$and": [{
      "$and": [{
        "_id": {
          "$eq": event.detail
        }
      }]
    }]
  },
  "relateWhere": {}
})
    )}}
        }
    ],"onbutton1$wb5nis8fxms_fail": [
      {
          key: 'wqz4nkaqixu',
          sourceKey: 'platform:showToast',
          handler: function({args}){ return $app.showToast(...args)},
          args: {
  "params": [
    {
      "icon": "error",
      "title": "支付失败",
      "duration": 1500
    }
  ]
},
          argsBinds: {}
        }
    ],"onbutton1$w2e7lhlm30g_fail": [
      {
          key: 'wq5cl620f68',
          sourceKey: 'platform:showToast',
          handler: function({args}){ return $app.showToast(...args)},
          args: {
  "params": [
    {
      "icon": "error",
      "title": "发起支付失败"
    }
  ]
},
          argsBinds: {}
        }
    ],"onbutton1$w1mdsbtff78_fail": [
      {
          key: 'wktkaq3fk8',
          sourceKey: 'platform:showToast',
          handler: function({args}){ return $app.showToast(...args)},
          args: {
  "params": [
    {
      "icon": "error",
      "title": "创建订单失败"
    }
  ]
},
          argsBinds: {}
        }
    ],}

const dataBinds = {
  [PAGE_ROOT_SYMBOL]: {
    
  },
  container7: { 'data.imgs': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      [
    {
      "imgUrl": "https://ymnbt-xcx-202410-6f4asil69699fa8-1324686205.tcloudbaseapp.com/resources/2024-10/lowcode-1991939",
      "title": "年报提示",
      "desc": "每年度年报提示"
    },
    {
        "imgUrl": "https://ymnbt-xcx-202410-6f4asil69699fa8-1324686205.tcloudbaseapp.com/resources/2024-11/lowcode-2012754",
        "title": "非官方温馨提示",
        "desc": "提示用户本系统是代办系统,非官方工商系统,本系统提供代办服务,收取手续费用."
      },
    {
      "imgUrl": "https://ymnbt-xcx-202410-6f4asil69699fa8-1324686205.tcloudbaseapp.com/resources/2024-10/lowcode-1991940",
      "title": "优民年报优势",
      "desc": "对比优民年报与自己年报优势"
    },
    {
      "imgUrl": "https://ymnbt-xcx-202410-6f4asil69699fa8-1324686205.tcloudbaseapp.com/resources/2024-10/lowcode-1991941",
      "title": "服务流程",
      "desc": "支付-填报-申报流程"
    }
  ]
    )},'style': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      {...widgetProps.container7.style, ...(
$w.wedaContext.platforms.includes("MOBILEWEB") ? {
  paddingTop: 40,
  paddingBottom: 40
} : {}
)}
    )}
  },
  text9: { 'text': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      $w.container7.data.title
    )},'style': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      {...widgetProps.text9.style, ...(
$w.wedaContext.platforms.includes('MOBILEWEB') ? {
  fontSize: 24
} : {}
)}
    )}
  },
  text10: { 'text': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      $w.container7.data.subTitle
    )},'style': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      {...widgetProps.text10.style, ...(
$w.wedaContext.platforms.includes("MOBILEWEB") ? {
  marginTop: 12,
  marginBottom: 40
} : {}
)}
    )}
  },
  repeater2: { 'data': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      $w.container7.data.imgs
    )}
  },
  repeater2_item: { '_waFor': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      $w.container7.data.imgs
    )}
  },
  image1: { 'src': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      $w.item_repeater2.imgUrl
    )},'style': ($page, lists, forItems, event, $context, $w, params) => {const $for = forItems; const $index=lists?.[0]?.currentIndex; return(
      {...widgetProps.image1.style, ...(
$w.wedaContext.platforms.includes('MOBILEWEB') ? {
  height: 229
} : {}
)}
    )}
  },
}

const query = {
}

const eventFlows = [
]

const datasetProfile = {
  "state": {},
  "params": {}
}

createPage({
  app,
  pageContext: $page,
  id: 'u_nian_du_bao_gao_she',
  widgetProps,
  lifecycle,
  state,
  computed,
  evtListeners,
  dataBinds,
  handlers,
  query,
  eventFlows,
  pageAttributes: {},
  resetShare: false,
  datasetProfile
})
